home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 987 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: news4.noc.netcom.net!zdc!zippo!usenet
  2. Newsgroups: comp.lang.c
  3. Subject: Re: Spawn and exit...
  4. Message-ID: <DKyyE1.Bu5@news.zippo.com>
  5. From: Jim McFarland <jgm6@orkand.em.cdc.gov>
  6. Date: Wed, 10 Jan 1996 14:18:00 GMT
  7. Sender: usenet@news.zippo.com
  8. References: <4ckcjc$e84@oly.olympic.net>
  9. Organization: The Orkand Corporation
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. Nntp-Posting-Host: 158.111.166.77
  13. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  14. Mime-Version: 1.0
  15.  
  16. poke@oly.olympic.net (Charlie Chaplin  ) wrote:
  17. >I am having trouble writing a program that spwans my windows 3.11 then 
  18. >kills itself. I realize that windows 3.11 would be a child process. The 
  19. >parent process takes up so much memory that it slows my windows down too 
  20. >much. The program that I wrote was a result of my father's complaints. 
  21. >Whenever I get into debugging the computer I rem out the win statement in 
  22. >the autoexec.bat, because I tend to reboot the computer a lot when I'm 
  23. >debugging. This is a very long and tedious process if windows has to load 
  24. >up every time(yes I know about F5, read on and you will understand). The 
  25. >problem is, I forget to unrem the win statement, and my 
  26. >semi-literate father can't figure out how to get word 6.0 working(Yes 
  27. >I've told hime a million times to just type WIN), and he starts 
  28. >hollering at me. If I hit F5 during reboot I don't get the path 
  29. >statement the memory managers and the config.sys, which are necessary for 
  30. >what I'm doing. So I wrote a program called win.exe and I placed it in my 
  31. >root directory. WHen the autoexec.bat gets down to the win statement it 
  32. >executes the local win.exe file. win.exe pauses the computer for about 4 
  33. >seconds and then spawns windows 3.11. If any key is pressed during the 4 
  34. >second pause the program exits and I am left with a DOS prompt. I just 
  35. >need help getting my program to kill itself if it ends up spawning 
  36. >windows 3.11, win.exe takes up almost 80K of memory when it's resident. I 
  37. >have also tried the system() function, it does the same thing.
  38.  
  39. Try using one of the execlp() type functions instead of spawning it.
  40.